#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    vector<int> twoSum(vector<int>& price, int target) {
        int left = 0, right = price.size() - 1, sum = 0;
        vector<int> ret;
        

        while (left < right)
        {
            sum = price[left] + price[right];
            if (sum == target)
            {
                ret.push_back(price[left]);
                ret.push_back(price[right]);
                return ret;
            }
            else if (sum < target)
            {
                ++left;
            }
            else
            {
                --right;
            }
        }

        return ret;
    }
};

int main()
{


    return 0;
}